package com.pray.praymall.product.dao;

import com.pray.praymall.product.entity.AttrGroupEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pray.praymall.product.vo.SkuItemVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 属性分组
 *
 * @author pray
 * @email pray_cbh@163.com
 * @date 2020-08-29 10:56:49
 */
@Mapper
public interface AttrGroupDao extends BaseMapper<AttrGroupEntity> {

    /**
     * 根据spuId和三级分类id查出所有的分组以及这些组里面的属性
     *
     * @param spuId     spuId
     * @param catalogId 三级分类id
     * @return SkuItemVo.SpuItemAttrGroupVo集合
     */
    List<SkuItemVo.SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(@Param("spuId") Long spuId, @Param("catalogId") Long catalogId);
}
